<template>
	<om-page :title="pageTitle" class="om-font-size">
		<view class="margin-top-xs">
			<view class="show-block" v-for="(item, index) in dataList" :key="index">
				<!-- <view class="show-title padding-left padding-top-xs" style="font-size: 16px;">明细{{ index + 1 }}</view> -->
				<view v-for="(sitem, sindex) in columnList" :key="sindex" style="display: block;">
					<view>
						<view class="tui-flex">
							<view class="tui-flex  justify-end tui-col-4 show-label" >
								<text class="om-font-size flex  justify-end">{{ sitem.title }}</text>
							</view>
							<view class="tui-col-8  flex justify-start align-center">
								<text class="flex  justify-start" >{{ item[sitem.field]}}</text>
							</view>
						</view>
					</view>
				</view>
				<om-divider :gap="[10, 10]" lineColor="#ddd" :lineSize="2"></om-divider>
			</view>
		</view>
	</om-page>
</template>

<script>
	export default {
		data() {
			return {
				pageTitle: '指标详细',
				columnList: [],
				dataList: [],
			};
		},
		methods: {
			
		},
		onLoad(data) {
			let _that = this;
			let arr = [_that.om.request("ttableColumn/getGridModel",{
				tableMark: 'KEY_169',
			}), _that.om.request("indexList/getTargetIndexList",{
				orderNum: data.orderNum,
				posId: data.posId,
				year: data.year,
			})]
			//多个AJAX全部完成时开始执行
			Promise.all(arr).then(res => {
				_that.columnList = res[0].value.frozenColumns[0].concat(res[0].value.columns[0])
				_that.dataList = res[1]
			})
		},
	};
</script>

<style>
</style>                                                  
